<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/lottery',
    'namespace' => 'Frieza\\Modules\\Lottery\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {

    // 抽奖活动列表
    $router->get('/activity/index', 'ActivityController@index');
    // 编辑
    $router->get('/activity/index/{id}/edit', 'ActivityController@edit');
    // 创建
    $router->get('/activity/index/create', 'ActivityController@edit');
    // 保存
    $router->post('/activity/index/save', 'ActivityController@saveSubmit');
    //删除
    $router->delete('/activity/index/{id}', 'ActivityController@delActivity');

    // 抽奖活动期数列表
    $router->get('/activity/{activity_id}/series/index', 'SeriesController@index');
    // 创建
    $router->get('/activity/{activity_id}/series/index/create', 'SeriesController@edit');
    // 修改
    $router->get('/activity/{activity_id}/series/index/{id}/edit', 'SeriesController@edit');
    // 保存
    $router->post('/activity/series/index/save', 'SeriesController@saveSubmit');
    // 删除
    $router->delete('/activity/{activity_id}/series/index/{id}', 'SeriesController@del');

    // 中奖用户列表
    $router->get('/series/{series_id}/awarduser/index', 'SeriesController@awardUserList');

    // 抽奖活动奖品列表
    $router->get('/series/{series_id}/prize/index', 'PrizeController@index');
    // 创建
    $router->get('/series/{series_id}/prize/index/create', 'PrizeController@edit');
    // 修改
    $router->get('/series/{series_id}/prize/index/{id}/edit', 'PrizeController@edit');
    // 保存
    $router->post('/series/prize/index/save', 'PrizeController@saveSubmit');
    // 删除
    $router->delete('/series/{series_id}/prize/index/{id}', 'PrizeController@del');


});
